<!--%import("filter/delete_checked.xml")-->
<!--%import("css/file_list.css")-->
<!--#include("header.html")-->

<!-- 검색 -->
<div class="fl">
    <form action="./" method="get" class="adminSearch">
    <input type="hidden" name="module" value="{$module}" />
    <input type="hidden" name="act" value="{$act}" />
    <input type="hidden" name="module_srl" value="{$module_srl}" />

        <fieldset>
            <select name="isvalid">
                <option value="">{$lang->status}</option>
                <option value="Y" <!--@if($isvalid=="Y")-->selected="selected"<!--@end-->>{$lang->is_valid}</option>
                <option value="N" <!--@if($isvalid=="N")-->selected="selected"<!--@end-->>{$lang->is_stand_by}</option>
            </select>
            <select name="search_target">
                <option value="">{$lang->search_target}</option>
                <!--@foreach($lang->file_search_target_list as $key => $val)-->
                <option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
                <!--@end-->
            </select>

            <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
            <span class="button blue"><input type="submit" value="{$lang->cmd_search}" /></span>
            <a href="{getUrl('','module',$module,'act',$act)}" class="button black"><span>{$lang->cmd_cancel}</span></a>
        </fieldset>
    </form>
</div>

<form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
<input type="hidden" name="page" value="{$page}" />

<!-- 모듈 선택 -->
<div class="fr">
    <a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_find_module}</span></a>
    <span class="button red"><input type="submit" value="{$lang->cmd_delete_checked_file}" /></span>
</div>

<!-- 목록 -->
<table cellspacing="0" class="crossTable clear">
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
<thead>
    <tr>
        <th scope="col"><div>{$lang->no}</div></th>
        <th scope="col"><div><input type="checkbox" onclick="XE.checkboxToggleAll(); return false;" /></div></th>
        <th scope="col" class="wide"><div>{$lang->file}</div></th>
        <th scope="col"><div>{$lang->file_size}</div></th>
        <th scope="col"><div>{$lang->status}</div></th>
        <th scope="col"><div>{$lang->cmd_download}</div></th>
        <th scope="col"><div>{$lang->date}</div></th>
        <th scope="col"><div>{$lang->ipaddress}</div></th>
        <th scope="col"><div>{$lang->nick_name}</div></th>
    </tr>
</thead>

<tbody>
<!--@foreach($file_list as $no => $val)-->
    <!--@if($val->upload_target_srl != $cur_upload_target_srl)-->
        <!--@if($val->upload_target_type == 'com')-->
            {@ $document_srl = $val->target_document_srl}
            {@ $move_uri = getUrl('', 'document_srl', $document_srl).'#comment_'.$val->upload_target_srl}
        <!--@elseif($val->upload_target_type == 'doc')-->
            {@ $document_srl = $val->upload_target_srl}
            {@ $move_uri = getUrl('', 'document_srl', $document_srl)}
        <!--@end-->
        {@ $cur_upload_target_srl = $val->upload_target_srl}
    <tr class="row{$cycle_idx} bg1">
        <th colspan="9">
            <!--@if(!$val->upload_target_type)-->
                <!--@if($val->isvalid=='Y')-->
                    {$lang->is_valid}
                <!--@else-->
                    {$lang->is_stand_by}
                <!--@end-->
            <!--@else-->
                <!--@if($val->upload_target_type == 'com')-->[{$lang->comment}] <!--@end-->
                <!--@if($val->upload_target_type == 'mod')-->[{$lang->module}] <!--@end-->

                <!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl] && $document_list[$document_srl]->get('module_srl') == $document_list[$document_srl]->get('member_srl'))-->[{$lang->cmd_temp_save}] <!--@end-->
                <!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl] && $document_list[$document_srl]->get('module_srl') == 0)-->[{$lang->cmd_trash}] <!--@end-->
                <a href="{getUrl('', 'mid', $module_list[$val->module_srl]->mid)}" onclick="window.open(this.href);return false;">{$module_list[$val->module_srl]->browser_title}</a>
                <!--@if($document_list[$document_srl] && ($val->upload_target_type == 'doc' || $val->upload_target_type == 'com'))-->
                 - <!--@if($document_list[$document_srl]->get('module_srl') != $document_list[$document_srl]->get('member_srl'))--><a href="{$move_uri}" onclick="window.open(this.href);return false;">{$document_list[$document_srl]->getTitle()}</a><!--@else-->{$document_list[$document_srl]->getTitle()}<!--@end-->
                <!--@end-->
            <!--@end-->
        </th>
    </tr>
    <!--@endif-->

    <tr>
        <td class="tCenter number">{$no}</td>
        <td class="tCenter"><input type="checkbox" name="cart" value="{$val->file_srl}" /></td>
        <td class="wide"><a href="{$val->download_url}" class="red">{htmlspecialchars($val->source_filename)}</a></td>
        <td class="number tRight">{FileHandler::filesize($val->file_size)}</td>
        <td class="tCenter">
        <!--@if($val->isvalid=='Y')-->
            {$lang->is_valid}
        <!--@else-->
            {$lang->is_stand_by}
        <!--@end-->
        </td>
        <td class="number tCenter">{$val->download_count}</td>
        <td class="date tCenter nowrap" title="{zdate($val->regdate,"Y-m-d H:i:s")}">{zdate($val->regdate,"Y-m-d")}</td>
        <td class="number tCenter nowrap"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
        <td class="nowrap">
        <!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl])-->
            <span class="member_{$document_list[$document_srl]->get('member_srl')}">{$document_list[$document_srl]->getNickName()}</span>
        <!--@elseif($val->upload_target_type == 'com' && $comment_list[$val->upload_target_srl])-->
            <span class="member_{$comment_list[$val->upload_target_srl]->get('member_srl')}">{$comment_list[$val->upload_target_srl]->getNickName()}</span>
        <!--@end-->
        </td>
    </tr>
<!--@endforeach-->
</tbody>
</table>

</form>

<!-- 페이지 네비게이션 -->
<div class="pagination a1">
    <a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
    <!--@while($page_no = $page_navigation->getNextPage())-->
        <!--@if($page == $page_no)-->
            <strong>{$page_no}</strong>
        <!--@else-->
            <a href="{getUrl('page',$page_no)}">{$page_no}</a>
        <!--@end-->
    <!--@end-->
    <a href="{getUrl('page',$page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
</div>

